using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace MKDS_Course_Editor
{
    public partial class Form2 : Form
    {
        public Form2()
        {
            InitializeComponent();
            toolStrip1.Renderer = new Form2.MyRender();
        }

        private void Form2_Load(object sender, EventArgs e)
        {
            
        }

        private void menuItem9_Click(object sender, EventArgs e)
        {

        }

        public class MyRender : ToolStripSystemRenderer
        {
            protected override void OnRenderToolStripBorder(ToolStripRenderEventArgs e)
            {
                //base.OnRenderToolStripBorder(e);
            }
            protected override void OnRenderToolStripPanelBackground(ToolStripPanelRenderEventArgs e)
            {
                base.OnRenderToolStripPanelBackground(e);
            }
            protected override void OnRenderToolStripBackground(ToolStripRenderEventArgs e)
            {
                base.OnRenderToolStripBackground(e);
                e.Graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
                e.Graphics.PixelOffsetMode = System.Drawing.Drawing2D.PixelOffsetMode.HighQuality;
                e.Graphics.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality;
                e.Graphics.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.NearestNeighbor;
                e.Graphics.DrawImage(Properties.Resources.Bar_left, 0, 0);
                e.Graphics.DrawImage(Properties.Resources.Bar_mid, 1, 0, e.AffectedBounds.Width - 2, 31);
                e.Graphics.DrawImage(Properties.Resources.Bar_left, e.AffectedBounds.Width - 1, 0);
            }
        }
    }
}
